package com.zwb.demo.easyweb.modules.menu;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 系统菜单表
 *
 * @author zwb
 * @date 2020-04-30T11:20:54.324554900
 */
@Repository
public interface SysMenuPORepository extends JpaRepository<SysMenuPO, String>, JpaSpecificationExecutor<SysMenuPO> {

    @Query("from SysMenuPO where isRoot=true")
    List<SysMenuPO> findAllRoot();

    List<SysMenuPO> findAllByParentId(String uuid);
}